package com.endurance.controller;

import com.endurance.feign.ProductClients;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * @Author: sunlin
 * @Date: 2024-04-18 8:11
 * @Version: 1.0
 * @Description: OpenFeign +
 */
@RestController
@RequestMapping("/hystrix1")
 public class Hystrix1Controller {

    @Autowired
    private ProductClients productClients;

    @GetMapping
    public HashMap test(String name) {
        HashMap hashMap = productClients.method1(name);
        System.out.println(hashMap);
        return hashMap;
    }

}
